﻿#ifndef _DB_IFEATURECLASS2_H
#define _DB_IFEATURECLASS2_H

#include "udatabase/interface/ifeatureclass.h"
#include "kernel/Referenced.h"
#include "udatabase/dll_cfg.h"
#include "kernel/OgreDataStream.h"

namespace FD
{
	namespace Utility
	{
		namespace DB
		{
			namespace Interface
			{
				class FD_DB_Export ISpatialIndexParam:public FD::Kernel::CReferenced
				{
				public:
					virtual FD::Utility::DB::Interface::SpatialIndexEnum getSpatialIndexType(){return mSpatialIndexType;}
					/// <summary>
					/// 将参数输出到流
					/// </summary>
					/// <param name="stream">输出参数，流</param>
					/// <returns></returns>
					virtual void toStream(  FD::Kernel::DataStream & stream ) const;
				public:
					virtual void fromStream( FD::Kernel::DataStream& stream );
				protected:
					ISpatialIndexParam(){mSpatialIndexType = SIE_UNKNOWN;}
				protected:
					FD::Utility::DB::Interface::SpatialIndexEnum mSpatialIndexType;
				};
				/// <summary>
				/// 要素类接口
				/// </summary>
				class FD_DB_Export IFeatureClass2 : public FD::Utility::DB::Interface::IFeatureClass
				{
				public:	
					/// <summary>
					/// 默认析构函数
					/// </summary>
					virtual ~IFeatureClass2();
				public:
					/// <summary>
					/// 为数据集，创建指定空间索引
					/// </summary>
					/// <param name="spaIndex">指定空间索引类型</param>
					/// <returns>ture，成功；false，失败</returns>
					virtual bool createSpatialIndex(FD::Utility::DB::Interface::ISpatialIndexParam* param);

				protected:
					/// <summary>
					/// 默认构造函数
					/// </summary>
					IFeatureClass2();
				private:
					/// <summary>
					/// 拷贝构造函数
					/// </summary>
					C_DISABLE_COPY(IFeatureClass2);
				};
			}
		}
	}
}

#endif
